Developer(s) | Oscar Toledo G |
---|---|
Type | Chess engine |
Website | Toledo Nanochess |
Toledo Nanochess is a chess engine developed by Mexican Oscar Toledo GutiƩrrez, a four times winner of the IOCCC. According to IOCCC rules it is 1255 characters. The author claims that it is the world's smallest chess program written in C.
The source code for Toledo Nanochess and other engines is available.[1] Because Toledo Nanochess is based on Toledo's winning entry from the 18th IOCCC (Best Game[2]) it is heavily obfuscated.
At this date (February 7, 2010) appears to be only two chess engines written in less than 2 kilobytes of C that are able to play the full legal chess moves: Toledo Nanochess and the Micro-Max by Dutch H.G. Muller.
Contents |
!r&&++C*--A));}}}Z++O>98?O=20:e-O);P N+M*M&&N>-K+1924|d?N:0;}main(){Z++B<121)*G ++=B/x%x<2|B%x<2?7:B/x&4?0:*l++&31;Z B=19){Z B++<99)putchar(B%x?l[B[I]|16]:x)_ x-(B=F)){i=I[B+=(x-F)*x]&z;b=F;b+=(x-F)*x;Z x-(*G=F))i=*G^8^y;}else v u,5);v u, 1);}}